package com.fuyd.pms.exception;

/**
 * Created by fuyongde on 2016/1/10.
 */
public class ServiceException extends RuntimeException {
    private int errorCode;
    private String errorMsg;
    private Object[] params;

    public ServiceException(int errorCode, String errorMsg, Object[] params) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.params = params;
    }

    public ServiceException(String message, int errorCode, String errorMsg, Object[] params) {
        super(message);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.params = params;
    }

    public ServiceException(String message, Throwable cause, int errorCode, String errorMsg, Object[] params) {
        super(message, cause);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.params = params;
    }

    public ServiceException(Throwable cause, int errorCode, String errorMsg, Object[] params) {
        super(cause);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.params = params;
    }

    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, int errorCode, String errorMsg, Object[] params) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.params = params;
    }
}
